package com.hdu.dwh.dtos.model_dtos;

import java.util.Map;
import java.util.Set;

import com.hdu.dwh.pojos.model_pojos.ConnectionColumn;
import com.hdu.dwh.pojos.model_pojos.MetaTable;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;


@Data
public class ModelCreateDto {
    @NotBlank(message = "模型名称不能为空")
    @Pattern(regexp = "^[a-z0-9_]+$", message = "name只能包含小写字母、数字和下划线，不能有'-'、大写字母或中文")
    private String name;
    
    private String description;

    @NotNull(message = "事实表不能为空")
    private MetaTable factTable;

    @NotNull(message = "数据库ID不能为空")
    private Long databaseId;

    private Set<MetaTable> dimensionTables;

    private Set<ConnectionColumn> joinColumns;

    private Set<String> primaryKeys;

    private Set<String> partitionKeys;

    private Map<String, String> options;
}
